package com.shanshan.manage.web.service.impl;

import com.shanshan.manage.web.domain.ACost;
import com.shanshan.manage.web.mapper.ACostMapper;
import com.shanshan.manage.web.service.IACostService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 费用Service业务层处理
 *
 * @author zhaoShuHeng
 * @date 2023-08-29
 */
@Service
public class ACostServiceImpl implements IACostService {
    @Resource
    private ACostMapper aCostMapper;

    /**
     * 查询费用
     *
     * @param costId 费用主键
     * @return 费用
     */
    @Override
    public ACost selectACostByCostId(Integer costId) {
        return aCostMapper.selectACostByCostId(costId);
    }

    /**
     * 查询费用列表
     *
     * @param aCost    费用
     * @return 费用
     */
    @Override
    public List<ACost> selectACostList(ACost aCost) {
        return aCostMapper.selectACostList(aCost);
    }
    @Override
    public int selectACostListTotal(ACost aCost) {
        return aCostMapper.selectACostListTotal(aCost);
    }

    /**
     * 新增费用
     *
     * @param aCost 费用
     * @return 结果
     */
    @Override
    public int insertACost(ACost aCost) {
        return aCostMapper.insertACost(aCost);
    }

    /**
     * 修改费用
     *
     * @param aCost 费用
     * @return 结果
     */
    @Override
    public int updateACost(ACost aCost) {
        return aCostMapper.updateACost(aCost);
    }

    /**
     * 批量删除费用
     *
     * @param costIds 需要删除的费用主键
     * @return 结果
     */
    @Override
    public int deleteACostByCostIds(Integer[] costIds) {
        return aCostMapper.deleteACostByCostIds(costIds);
    }

    /**
     * 删除费用信息
     *
     * @param costId 费用主键
     * @return 结果
     */
    @Override
    public int deleteACostByCostId(Integer costId) {
        return aCostMapper.deleteACostByCostId(costId);
    }
}
